home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-14 | 1.1 KB | 50 lines | [TEXT/MPS ] |
- #
- # File: CompareLastRevision
- #
- # Contains: script to compare a file with the last revision of it
- #
- # Usage: CompareLastRevision file…
- #
- # CompareLastRevision runs a compare command with the last revision
- # of a file checked out for modification.
- #
- # Written by: Darin Adler and scott douglass
- #
- # Copyright: © 1988, 1989 by Apple Computer, Inc., all rights reserved.
- #
- # Change History:
- #
- # 11/9/89 dba twiddled a bit; CompareRevisions is better
- # 11/8/89 dba change != to ≠
- #
- # To Do:
- #
-
- Set Exit 0
-
- For File In {"Parameters"}
- If "{File}" !~ /:*([¬:]+:*)*([¬:]+)®1/
- Echo "### {0} - “{File}”: bad file name" > Dev:StdErr
- Continue
- End
- Set Short "{®1}"
-
- Set Info "`ProjectInfo "{File}"`"
- If "{Info}" !~ /≈Project: ([¬:]+∫)®1 Checked out: ≈/
- Echo "### {0} - “{File}”: not part of project" > Dev:StdErr
- Continue
- End
- Set Project "{®1}"
-
- CheckOut -d "{Boot}" -project "{Project}" "{Short}"
- Set CheckOutStatus {Status}
- If {CheckOutStatus}
- Echo "### {0} - unable to check out “{File}”" > Dev:StdErr
- Exit {CheckOutStatus}
- End
-
- Compare -n -t -x "{Boot}{Short}" "{File}"
-
- Delete -i "{Boot}{Short}"
- End
-